package com.charlotte.study.gupao.memento.editor;

import java.util.Stack;

/**
 * 备忘录管理类
 * @author junjie.ding
 * @date 2020/3/23
 */
public class DraftsBox {

    private static Stack<ArticleMemento> STACK = new Stack<>();

    public ArticleMemento getMemento(){
        ArticleMemento memento = STACK.pop();
        return memento;
    }

    public void addMemento(ArticleMemento memento){
        STACK.push(memento);
    }
}
